CentOS 6
Sponsored Link

OpenStack Icehouse : Configure Nova
2014/06/23
 
Install and Configure OpenStack Compute Service (Nova).
[1] Install Nova
# install from RDO, EPEL

[root@dlp ~]#
yum --enablerepo=openstack-icehouse,epel -y install openstack-nova
[2] Configure Nova
# set database ( set any password you like for "password" section )

[root@dlp ~]#
openstack-db --init --service nova --password password

Please enter the password for the 'root' MySQL user:  
# MariaDB root password

Verified connectivity to MySQL.
Creating 'nova' database.
Updating 'nova' database password in /etc/nova/nova.conf
Initializing the nova database, please wait...
Complete!
[root@dlp ~]#
mv /etc/nova/nova.conf /etc/nova/nova.conf.org

[root@dlp ~]#
vi /etc/nova/nova.conf
# create new

[DEFAULT]
# RabbitMQ server's hostname or IP

rabbit_host=10.0.0.30
rabbit_port=5672
# RabbitMQ server's User for auth

rabbit_userid=guest
# RabbitMQ server's password of the User above

rabbit_password=password
notification_driver=nova.openstack.common.notifier.rpc_notifier
rpc_backend=rabbit
# define own IP

my_ip=10.0.0.30
# add it if not need IPv6

use_ipv6=false
state_path=/var/lib/nova
enabled_apis=ec2,osapi_compute,metadata
osapi_compute_listen=0.0.0.0
osapi_compute_listen_port=8774
rootwrap_config=/etc/nova/rootwrap.conf
api_paste_config=api-paste.ini
auth_strategy=keystone
# Glance server's hostname or IP

glance_host=10.0.0.30
glance_port=9292
glance_protocol=http
lock_path=/var/lib/nova/tmp
log_dir=/var/log/nova
# Memcached server's hostname or IP

memcached_servers=10.0.0.30:11211
scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler
[database]
# connection info for MariaDB ( the "password" is the one you inputed with "openstack-db" command )

connection=mysql://nova:password@10.0.0.30/nova
[keystone_authtoken]
# Keystone server's hostname or IP

auth_host=10.0.0.30
auth_port=35357
auth_protocol=http
auth_version=v2.0
admin_user=nova
# Nova user's password added in Keystone

admin_password=servicepassword
admin_tenant_name=service
signing_dir=/var/lib/nova/keystone-signing
[root@dlp ~]#
chmod 640 /etc/nova/nova.conf

[root@dlp ~]#
chgrp nova /etc/nova/nova.conf

[3] Configure Networking.
The follows is for the case you use legacy nova-network function.
But if you use Neutron Networking function, Refer to here to configure it.
Anyway, legacy nova-network function is officially not recommended.
[root@dlp ~]#
vi /etc/nova/nova.conf
# add follows in [DEFAULT] section

network_driver=nova.network.linux_net
libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver
linuxnet_interface_driver=nova.network.linux_net.LinuxBridgeInterfaceDriver
firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
network_api_class=nova.network.api.API
security_group_api=nova
network_manager=nova.network.manager.FlatDHCPManager
network_size=254
allow_same_net_traffic=False
multi_host=True
send_arp_for_ha=True
share_dhcp_address=True
force_dhcp_release=True
# specify nic for public

public_interface=eth0
# specify any name you like for bridge

flat_network_bridge=br100
# specify nic for flat DHCP bridge

flat_interface=lo
[4] Start Nova Service.
If you don't use legacy nova-network, exclude the word "network" below.
If you separate Compute Nodes, exclude the word "compute" below, too.
[root@dlp ~]#
for service in api objectstore compute conductor network scheduler cert consoleauth; do
/etc/rc.d/init.d/openstack-nova-$service start
chkconfig openstack-nova-$service on
done

Starting openstack-nova-api:                  [  OK  ]
Starting openstack-nova-objectstore:          [  OK  ]
Starting openstack-nova-compute:              [  OK  ]
Starting openstack-nova-conductor:            [  OK  ]
Starting openstack-nova-network:              [  OK  ]
Starting openstack-nova-scheduler:            [  OK  ]
Starting openstack-nova-cert:                 [  OK  ]
Starting openstack-nova-consoleauth:          [  OK  ]

# start cert again because it is down at first booting

[root@dlp ~]#
/etc/rc.d/init.d/openstack-nova-cert start

Starting openstack-nova-cert: [ OK ]
# show status

[root@dlp ~]#
nova-manage service list

Binary           Host                     Zone             Status     State Updated_At
nova-conductor   dlp.srv.world         internal         enabled    :-)   2014-05-07 12:41:00
nova-scheduler   dlp.srv.world         internal         enabled    :-)   2014-05-07 12:41:01
nova-consoleauth dlp.srv.world         internal         enabled    :-)   2014-05-07 12:41:01
nova-network     dlp.srv.world         internal         enabled    :-)   2014-05-07 12:41:01
nova-compute     dlp.srv.world         nova             enabled    :-)   2014-05-07 12:41:02
nova-cert        dlp.srv.world         internal         enabled    :-)   2014-05-07 12:41:03
 
Tweet